AR	=ar
AS	=as --32
CC	=gcc
LD	=ld -m elf_i386
CFLAGS	=-Wall -g -m32 -fstrength-reduce -fno-stack-protector -fomit-frame-pointer -no-pie -fno-pic -I../include
CPP	=gcc -E -nostdinc -I../include

.c.s:
	$(CC) $(CFLAGS) \
	-S -o $*.s $<
.c.o:
	$(CC) $(CFLAGS) \
	-c -o $*.o $<
.s.o:
	$(AS) -o $*.o $<

OBJS= open.o read_write.o inode.o file_table.o buffer.o super.o char_dev.o file_dev.o namei.o fcntl.o

fs.o: $(OBJS)
	$(LD) -r -o fs.o $(OBJS)

clean:
	-rm -f *.o *.a
	for i in *.c;do rm -f `basename $$i .c`.s;done

